<?php
/**
 * GameModel
 * 
 * @author Admin
 * @version 
 */
require_once 'Zend/Db/Table/Abstract.php';
class Wap_Models_DuAnModel extends Zend_Db_Table_Abstract
{
    /**
     * The default table name 
     */
    protected $_name = 'tbl_duan';
    protected $_primary = 'idq';

    function getListDuAn($page=1){
        $db = Zend_Db_Table::getDefaultAdapter();
        $mySql = $db->select()
                    ->from($this->_name)
                    ->order('nameq desc');

    //echo $mySql;die;
        $result = $db->fetchAll($mySql);
        return $result;
    }
  
    function loadbyid($id){
         $db = Zend_Db_Table_Abstract::getDefaultAdapter();
        $mySql = $db->select()->from($this->_name)->where('idq = '.$id);
       //echo $mySql;die;
        $result = $db->fetchRow($mySql);
        return $result;
    }

    
}